/**
 * HttpTask.java
 * 
 * Created on 26.05.2012 15:54:00
 */
package de.g18.scavengerhunt.types;

import android.graphics.Bitmap;
import android.net.Uri;
import android.os.AsyncTask;
import de.g18.scavengerhunt.utils.ImageUtils;

/**
 * This tasks downloads other users pictures from the webserice
 */
public class DownloadImageTask extends AsyncTask<Object, Integer, Bitmap> {

    @Override
    protected Bitmap doInBackground(Object... params)  {
        Bitmap bitmap = null;
        String fileName = (String) params[0];
        Uri url = (Uri) params[1];
        bitmap = ImageUtils.getBitmapFromUri(fileName, url);
        return bitmap;
    }
    
    /**
     * Will be called when the download is in progress.
     */
    @Override
    protected void onProgressUpdate(Integer... values) {
    	super.onProgressUpdate(values);
    }
}
